package com.knowledgegraph.zhongyao.service.impl;

import java.util.List;
import java.util.UUID;

import com.knowledgegraph.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.knowledgegraph.zhongyao.mapper.IntroduceMapper;
import com.knowledgegraph.zhongyao.domain.Introduce;
import com.knowledgegraph.zhongyao.service.IIntroduceService;

/**
 * 医案维护Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-03
 */
@Service
public class IntroduceServiceImpl implements IIntroduceService 
{
    @Autowired
    private IntroduceMapper introduceMapper;

    /**
     * 查询医案维护
     * 
     * @param key 医案维护主键
     * @return 医案维护
     */
    @Override
    public Introduce selectIntroduceByKey(String key)
    {
        return introduceMapper.selectIntroduceByKey(key);
    }

    /**
     * 查询医案维护列表
     * 
     * @param introduce 医案维护
     * @return 医案维护
     */
    @Override
    public List<Introduce> selectIntroduceList(Introduce introduce)
    {
        return introduceMapper.selectIntroduceList(introduce);
    }

    /**
     * 新增医案维护
     * 
     * @param introduce 医案维护
     * @return 结果
     */
    @Override
    public int insertIntroduce(Introduce introduce)
    {

        return introduceMapper.insertIntroduce(introduce);
    }

    /**
     * 修改医案维护
     * 
     * @param introduce 医案维护
     * @return 结果
     */
    @Override
    public int updateIntroduce(Introduce introduce)
    {
        introduce.setUpdateTime(DateUtils.getNowDate());
        return introduceMapper.updateIntroduce(introduce);
    }

    /**
     * 批量删除医案维护
     * 
     * @param keys 需要删除的医案维护主键
     * @return 结果
     */
    @Override
    public int deleteIntroduceByKeys(String[] keys)
    {
        return introduceMapper.deleteIntroduceByKeys(keys);
    }

    /**
     * 删除医案维护信息
     * 
     * @param key 医案维护主键
     * @return 结果
     */
    @Override
    public int deleteIntroduceByKey(String key)
    {
        return introduceMapper.deleteIntroduceByKey(key);
    }
}
